//
//  Member.swift
//  JiaoZiTaxi
//
//  Created by Hu Gang on 2022/10/12.
//

import Foundation

struct Member:Codable,Equatable,Identifiable {
  var id = UUID()
  let identifier: String?
  let name: String
  let openId:String
  let type: EnumSender

  func icon() -> String {
    if type == .Driver {
      return "driver_avatar"
    } else {
      return "passenger_avatar"
    }
  }
}

extension Member {
  static let demo = Member(identifier: nil, name: "Demo", openId: "demo001", type: .Driver)
  static let me   = Member(identifier: "passenger", name: "我", openId: "self", type: .Passenger)
}
